package dev.ece.suit.ui;

import java.awt.image.BufferedImage;
import java.io.IOException;

import dev.ece.core.cells.model.AbstractUI;
import dev.ece.core.texture.Texture;
import dev.ece.util.lib.IntOffset;
import dev.ece.util.lib.IntRectangle;
import dev.ece.util.obj.ObjectCount;

public class ContentItem extends Component {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2256716928523136882L;
	
	private boolean autoVisible = true;
	
	public ContentItem(AbstractUI<Float> ui, BufferedImage background) {
		super(ui, background);
	}

	public ContentItem(AbstractUI<Float> ui, ObjectCount<Texture> background) {
		super(ui, background);
	}

	public ContentItem(AbstractUI<Float> ui, String background) throws IOException {
		super(ui, background);
	}

	public ContentItem(BufferedImage image, float width, float height, IntRectangle centerClipping) {
		super(image, width, height, centerClipping);
	}

	public ContentItem(BufferedImage image, float width, float height) {
		super(image, width, height);
	}

	public ContentItem(BufferedImage image, IntRectangle textureClipping, float width, float height,
			IntRectangle centerClipping) {
		super(image, textureClipping, width, height, centerClipping);
	}

	public ContentItem(BufferedImage image, IntRectangle textureClipping, float width, float height) {
		super(image, textureClipping, width, height);
	}

	public ContentItem(ObjectCount<Texture> background, float width, float height, IntRectangle centerClipping) {
		super(background, width, height, centerClipping);
	}

	public ContentItem(ObjectCount<Texture> background, float width, float height) {
		super(background, width, height);
	}

	public ContentItem(ObjectCount<Texture> background, IntRectangle textureClipping, float width, float height,
			IntRectangle centerClipping) {
		super(background, textureClipping, width, height, centerClipping);
	}

	public ContentItem(ObjectCount<Texture> background, IntRectangle textureClipping, float width, float height) {
		super(background, textureClipping, width, height);
	}

	public ContentItem(String background, float width, float height, IntRectangle centerClipping) throws IOException {
		super(background, width, height, centerClipping);
	}

	public ContentItem(String background, float width, float height) throws IOException {
		super(background, width, height);
	}

	public ContentItem(String background, IntRectangle textureClipping, float width, float height,
			IntRectangle centerClipping) throws IOException {
		super(background, textureClipping, width, height, centerClipping);
	}

	public ContentItem(String background, IntRectangle textureClipping, float width, float height) throws IOException {
		super(background, textureClipping, width, height);
	}

	public ContentItem(BufferedImage image, float width, float height, IntOffset centerClipping) {
		super(image, width, height, centerClipping);
	}

	public ContentItem(BufferedImage image, IntRectangle textureClipping, float width, float height,
			IntOffset centerClipping) {
		super(image, textureClipping, width, height, centerClipping);
	}

	public ContentItem(ObjectCount<Texture> background, float width, float height, IntOffset centerClipping) {
		super(background, width, height, centerClipping);
	}

	public ContentItem(ObjectCount<Texture> background, IntRectangle textureClipping, float width, float height,
			IntOffset centerClipping) {
		super(background, textureClipping, width, height, centerClipping);
	}

	public ContentItem(String background, float width, float height, IntOffset centerClipping) throws IOException {
		super(background, width, height, centerClipping);
	}

	public ContentItem(String background, IntRectangle textureClipping, float width, float height,
			IntOffset centerClipping) throws IOException {
		super(background, textureClipping, width, height, centerClipping);
	}

	public boolean isAutoVisible() {
		return autoVisible;
	}

	public void setAutoVisible(boolean autoVisible) {
		this.autoVisible = autoVisible;
	}

	@Override
	public boolean isVisible() {
		return super.isVisible() && this.isAutoVisible();
	}

}
